# Examples of Aggregate Qualifiers

These examples are made with the [Sum - chart function](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/ChartFunctions/BasicAggregationFunctions/sum.htm#sum) function, but may be applied on all chart aggregation functions supporting set analysis definitions and the total qualifier.

Example 1:

Study the representation of a straight table below, depicting the logical state before any selections have been made:

![Example table image of aggregation function with total qualifier](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/Resources/Images/ex_gen_aggregatequal1.png)

Example table: Aggregation function with total qualifier

| Month | Group | Sum(Value) | sum(total Value) | sum({1} total Value) |
| --- | --- | --- | --- | --- |
| - | - | 21 | 21 | 21 |
| 1 | A | 1 | 21 | 21 |
| 1 | B | 2 | 21 | 21 |
| 2 | A | 3 | 21 | 21 |
| 2 | B | 4 | 21 | 21 |
| 3 | A | 5 | 21 | 21 |
| 3 | B | 6 | 21 | 21 |

The second and third expression column have the same number in all rows. This number equals the calculated total in the first expression column.

Now, let's select months 1 and 2 only. The result is as follows:

![Example table image of aggregation function with total qualifier filtered by month](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/Resources/Images/ex_gen_aggregatequal2.png)

Example table: Aggregation function with total qualifier, filtered by month

| Month (Filter: 1-2) | Group | Sum(Value) | sum(total Value) | sum({1} total Value) |
| --- | --- | --- | --- | --- |
| - | - | 10 | 10 | 21 |
| 1 | A | 1 | 10 | 21 |
| 1 | B | 2 | 10 | 21 |
| 2 | A | 3 | 10 | 21 |
| 2 | B | 4 | 10 | 21 |

The result of the third expression (fifth column) remains unchanged because the set definition disregards current selections. The second expression (fourth column) with the total qualifier, shows the new total 10, which is still equivalent to the first expression total (third column).

Example 2:

Study the representation of a straight table below:

![Example table image of total qualifier with listed fields](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/Resources/Images/ex_gen_aggregatequal3.png)

Example table: Total qualifier with listed fields

| Month | Group | Sum(Value) | sum(total &lt;Month&gt; Value) | sum(total &lt;Group&gt; Value) |
| --- | --- | --- | --- | --- |
| - | - | 21 | 21 | 21 |
| 1 | A | 1 | 3 | 9 |
| 1 | B | 2 | 3 | 12 |
| 2 | A | 3 | 7 | 9 |
| 2 | B | 4 | 7 | 12 |
| 3 | A | 5 | 11 | 9 |
| 3 | B | 6 | 11 | 12 |

In the third expression column (`sum(total<Month> 
 Val)`) one total is calculated for each month.

In the fourth expression column (`sum(total<Grp> Val)`) one total is calculated for each group.

## Learn more

* [Set analysis and set expressions](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/ChartFunctions/SetAnalysis/set-analysis-expressions.htm)
* [Sum of rows in pivot tables](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/ChartFunctions/NestedAggregations/sum-of-rows-pivot-tables.htm)
* [Aggr](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/ChartFunctions/aggr.htm "Aggr")